import entity.Role;

import java.util.List;

/**
 * @author: knowno
 * @create: 2025-09-18 09:04
 * @Version 1.0
 **/
public class TestJDBC_Query_Page_DBUtil {
    public static void main(String[] args) {

       //直接调用工具类的静态方法来实现增加删除和修改
        String sql = "select * from role";
        PageData<Role> pageData = DBUtil2.exQueryByPage(sql, Role.class, 2, 2);

        System.out.println(pageData.getPageNo());
        System.out.println(pageData.getPageSize());
        System.out.println(pageData.getTotal());
        System.out.println(pageData.getTotalPage());
        System.out.println(pageData.getData());
        for (Role role : pageData.getData()) {
            System.out.println(role);
        }
    }
}
